package dispatcher.gui.event;

import dispatcher.gui.state.GroupDispatcherStateHandler;
import state.group.GroupDispatcherState;

/**
 * This class will talk attempt to initialize the local state of the GUI from messages
 * received from the group dispatcher
 * @author Caleb
 *
 */
public class StatusInitializeThread extends Thread {

	private GroupDispatcherState state;
	
	/**
	 * The main constructor
	 * @param state The initial state of the group dispatcher
	 */
	public StatusInitializeThread(GroupDispatcherState state){
		super("StatusInitializeThread");
		this.state = state;
	}
	
	@Override
	public void run(){
		GroupDispatcherStateHandler handler = GroupDispatcherStateHandler.getInstance();
		// Attempts to initialize state
		handler.createInitialStatus(state);
	}
}
